import request from '@/config/utils/request'
import { loadingParams, pageLoadingParams } from '@/basa/utils/public'
// 协议列表
export function getAgreementList(data) {
  return request({
    url: '/apis/smp/smptransportconc/listSmpTransportConcProtocolPage',
    method: 'POST',
    data: { ...data, ...pageLoadingParams }
  })
}
// 撤回
export function getAgreementTurn(data) {
  return request({
    url: '/apis/smp/smptransportconc/revokeSmpTransProtocol',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}
// 删除
export function getAgreementDelete(data) {
  return request({
    url: '/apis/smp/smptransportconc/removeSmpTransProtocol',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}

// 补充协议详情
export function getEquipmentProtocolConcDetail(data) {
  return request({
    url: '/apis/smp/smptransportconc/getSmpTransportConcById',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}
export function getEquipmentNormalConcDetail(data) {
  return request({
    url: '/apis/smp/smptransportconc/getSmpTransportConcById',
    method: 'POST',
    data
  })
}
// 新增补充协议
export function getAgreementAdd(data) {
  return request({
    url: '/apis/smp/smptransportconc/saveSmpTransProtocol',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}

// 修改
export function getAgreementEditor(data) {
  return request({
    url: '/apis/smp/smptransportconc/editSmpTransProtocol',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}
